I think a big reason that religions require or at least strongly encourage people to pray is in order to control their minds. Engaging in praying and other rituals (including attending KH meetings and going out in field service) helps to keep religion on people's minds, and that has the effect of controlling people's minds.For many people it also probably causes them to retain their belief in a god/God and in the religion.
In a way even the WT admits this, though they say it in a way which they say is positive and beneficial to people. For an example see what they say in paragraph 7 on page 59 of the WT book called Live With Jehovah's Day In Mind. It says a Christian might get into a situation in which "... he feels that he must miss some Christian meetings in order to work. In time, missing meetings becomes easier, and he misses more frequently. Little by little, his bond with god weakens-he has 'begun to forget his Maker.' " Likewise note that pages 66-67 say the following. "We need more than superficial knowledge about Jehovah. He must become real to us, our trusted Friend who we can approach freely.' Interestingly I read pages 59 and 66-67 about twelve hours before I read the posts of this forum topic.
When I was a teenager (or perhaps younger) I asked by mother (a devout JW) 'why do I need to pray so often, since Jehovah knows what I need and want and knows everything anyway.' She said 'it is because Jehovah wants us to talk to him.' But Jehovah never talked (or communicated in any other way) to me and there was no evidence, which I could discern, that I ever had an actual relationship with Jehovah God. It was like me writing letters to an address in which there is no person at the address to receive any of the mail, nor anyone else retrieving the mail!